import requests

# 封装ihrm登录接口类
class IhrmLoginApi:
    # 定义类方法
    @classmethod
    def login(cls, req_json):
        resp = requests.post(url='http://ihrm-test.itheima.net/api/sys/login',
                             json=req_json)
        # 返回值
        return resp


if __name__ == '__main__':
    resp = IhrmLoginApi.login({"mobile": "13800000002", "password": "123456"})
    print(resp.json())
